<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('dicts', function (Blueprint $table) {
            $table->id()->comment('主键id');
            $table->string('name', 100)->comment('字典名称');
            $table->string('dictCode', 100)->comment('字典编码');
            $table->tinyInteger('status')->default(1)->comment('状态：0-禁用，1-启用!!');
            $table->string('remark', 255)->nullable()->comment('备注');
            $table->timestamp('createTime')->nullable()->comment('创建时间（秒级时间戳）');
            $table->timestamp('updateTime')->nullable()->comment('更新时间（秒级时间戳）');
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('dicts');
    }
};
